import com.java46.bean.Admin;
import com.java46.bean.CarBrand;
import com.java46.mapper.AdminMapper;
import com.java46.service.CarBrandService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class Entryces2 {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("classpath:applicationContext.xml");
//        AdminMapper bean = context.getBean(AdminMapper.class);
//        List<Admin> admins = bean.selectAll();
//        for (Admin admin:admins) {
//            System.out.println(admin.getAdminAccount()+"----"+admin.getAdminName());
//        }
        CarBrandService carBrandService = context.getBean(CarBrandService.class);
        List<CarBrand> carBrands = carBrandService.QueryCar();
        for (CarBrand car:carBrands) {
            System.out.println(car.getCarBrandName()+"----"+car.getCarBrandImg());
        }
    }
}
